from datetime import datetime

from pydantic import BaseModel, Field
from schemas import GMT


class WeeklyReportIn(BaseModel):
    name: str = Field(example='项目名称')
    person: list = Field(example='项目人员')
    description: str = Field(example='项目描述')
    department: str = Field(example='部门')
    level: str = Field(example='优先级')
    attachment: list = Field(example='附件')


class WeeklyReportCreate(WeeklyReportIn):
    pass


class WeeklyReportUpdate(WeeklyReportIn):
    pass


class WeeklyReportOut(WeeklyReportIn, GMT):
    id: int = Field(example='编号')

    class Config:
        orm_mode = True
